package likou;

/**
 * @Info:
 * @Author: 唐小尊
 * @Date: 2020/7/8  20:29
 */
public class _16_11 {
    public static void main(String[] args) {
        int shorter = 3;
        int k = 5;
        int ww [] = new int[]{shorter * k};
        System.out.println(ww.length);
        for (int i=0;i<ww.length;i++){
            System.out.println(ww[i]);
        }
    }
    public int[] divingBoard(int shorter, int longer, int k) {
        if (k == 0) {
            return new int[0];
        }
        if (shorter == longer) {
            return new int[]{shorter * k};
        }
        int[] lengths = new int[k + 1];
        for (int i = 0; i <= k; i++) {
            lengths[i] = shorter * (k - i) + longer * i;
        }
        return lengths;
    }
}
